package src.Players;

import src.Main;

public class LevelUp
{
    public LevelUp(Player p, int skill)
    {
        if(p == null || skill < 0 || skill > 20)
        {
            return;
        }
        switch(skill)
        {
            case 0:
                p.frame.chatboxInterface(p, 6247);
                p.frame.setText126(p, "Congratulations, you just advanced an attack level!", 6248);
                p.frame.setText126(p, "Your attack level is now " + p.getLevelForXP(skill) + " .", 6249);
                p.frame.sendMessage(p, "Congratulations, you just advanced an attack level.");
            break;
            case 1:
                p.frame.chatboxInterface(p, 6253);
                p.frame.setText126(p, "Congratulations, you just advanced a defence level!", 6254);
                p.frame.setText126(p, "Your defence level is now " + p.getLevelForXP(skill) + " .", 6255);
                p.frame.sendMessage(p, "Congratulations, you just advanced a defence level.");
            break;
            case 2:
                p.frame.chatboxInterface(p, 6206);
                p.frame.setText126(p, "Congratulations, you just advanced a strength level!", 6207);
                p.frame.setText126(p, "Your strength level is now " + p.getLevelForXP(skill) + " .", 6208);
                p.frame.sendMessage(p, "Congratulations, you just advanced a strength level.");
            break;
            case 3:
                p.frame.chatboxInterface(p, 6216);
                p.frame.setText126(p, "Congratulations, you just advanced a hitpoints level!", 6217);
                p.frame.setText126(p, "Your hitpoints level is now " + p.getLevelForXP(skill) + " .", 6218);
                p.frame.sendMessage(p, "Congratulations, you just advanced a hitpoints level.");
            break;
            case 4:
                p.frame.chatboxInterface(p, 4443);
                p.frame.setText126(p, "Congratulations, you just advanced a ranged level!", 5453);
                p.frame.setText126(p, "Your ranged level is now " + p.getLevelForXP(skill) + " .", 6114);
                p.frame.sendMessage(p, "Congratulations, you just advanced a ranging level.");
            break;
            case 5:
                p.frame.chatboxInterface(p, 6242);
                p.frame.setText126(p, "Congratulations, you just advanced a prayer level!", 6243);
                p.frame.setText126(p, "Your prayer level is now " + p.getLevelForXP(skill) + " .", 6244);
                p.frame.sendMessage(p, "Congratulations, you just advanced a prayer level.");
            break;
            case 6:
                p.frame.chatboxInterface(p, 6211);
                p.frame.setText126(p, "Congratulations, you just advanced a magic level!", 6212);
                p.frame.setText126(p, "Your magic level is now " + p.getLevelForXP(skill) + " .", 6213);
                p.frame.sendMessage(p, "Congratulations, you just advanced a magic level.");
            break;
            case 7:
                p.frame.chatboxInterface(p, 6226);
                p.frame.setText126(p, "Congratulations, you just advanced a cooking level!", 6227);
                p.frame.setText126(p, "Your cooking level is now " + p.getLevelForXP(skill) + " .", 6228);
                p.frame.sendMessage(p, "Congratulations, you just advanced a cooking level.");
            break;
            case 8:
                p.frame.chatboxInterface(p, 4272);
                p.frame.setText126(p, "Congratulations, you just advanced a woodcutting level!", 4273);
                p.frame.setText126(p, "Your woodcutting level is now " + p.getLevelForXP(skill) + " .", 4274);
                p.frame.sendMessage(p, "Congratulations, you just advanced a woodcutting level.");
            break;
            case 9:
                p.frame.chatboxInterface(p, 6231);
                p.frame.setText126(p, "Congratulations, you just advanced a fletching level!", 6232);
                p.frame.setText126(p, "Your fletching level is now " + p.getLevelForXP(skill) + " .", 6233);
                p.frame.sendMessage(p, "Congratulations, you just advanced a fletching level.");
            break;
            case 10:
                p.frame.chatboxInterface(p, 6258);
                p.frame.setText126(p, "Congratulations, you just advanced a fishing level!", 6259);
                p.frame.setText126(p, "Your fishing level is now " + p.getLevelForXP(skill) + " .", 6260);
                p.frame.sendMessage(p, "Congratulations, you just advanced a fishing level.");
            break;
            case 11:
                p.frame.chatboxInterface(p, 4282);
                p.frame.setText126(p, "Congratulations, you just advanced a fire making level!", 4283);
                p.frame.setText126(p, "Your firemaking level is now " + p.getLevelForXP(skill) + " .", 4284);
                p.frame.sendMessage(p, "Congratulations, you just advanced a fire making level.");
            break;
            case 12:
                p.frame.chatboxInterface(p, 6263);
                p.frame.setText126(p, "Congratulations, you just advanced a crafting level!", 6264);
                p.frame.setText126(p, "Your crafting level is now " + p.getLevelForXP(skill) + " .", 6265);
                p.frame.sendMessage(p, "Congratulations, you just advanced a crafting level.");
            break;
            case 13:
                p.frame.chatboxInterface(p, 6221);
                p.frame.setText126(p, "Congratulations, you just advanced a smithing level!", 6222);
                p.frame.setText126(p, "Your smithing level is now " + p.getLevelForXP(skill) + " .", 6223);
                p.frame.sendMessage(p, "Congratulations, you just advanced a smithing level.");
            break;
            case 14:
                p.frame.chatboxInterface(p, 4416);
                p.frame.setText126(p, "Congratulations, you just advanced a mining level!", 4417);
                p.frame.setText126(p, "Your mining level is now " + p.getLevelForXP(skill) + " .", 4438);
                p.frame.sendMessage(p, "Congratulations, you just advanced a mining level.");
            break;
            case 15:
                p.frame.chatboxInterface(p, 6237);
                p.frame.setText126(p, "Congratulations, you just advanced a herblore level!", 6238);
                p.frame.setText126(p, "Your herblore level is now " + p.getLevelForXP(skill) + " .", 6239);
                p.frame.sendMessage(p, "Congratulations, you just advanced a herblore level.");
            break;
            case 16:
                p.frame.chatboxInterface(p, 4277);
                p.frame.setText126(p, "Congratulations, you just advanced a agility level!", 4278);
                p.frame.setText126(p, "Your agility level is now " + p.getLevelForXP(skill) + " .", 4279);
                p.frame.sendMessage(p, "Congratulations, you just advanced an agility level.");
            break;
            case 17:
                p.frame.chatboxInterface(p, 4261);
                p.frame.setText126(p, "Congratulations, you just advanced a thieving level!", 4263);
                p.frame.setText126(p, "Your theiving level is now " + p.getLevelForXP(skill) + " .", 4264);
                p.frame.sendMessage(p, "Congratulations, you just advanced a thieving level.");
            break;
            case 18:
                p.frame.chatboxInterface(p, 12122);
                p.frame.setText126(p, "Congratulations, you just advanced a slayer level!", 12123);
                p.frame.setText126(p, "Your slayer level is now " + p.getLevelForXP(skill) + " .", 12124);
                p.frame.sendMessage(p, "Congratulations, you just advanced a slayer level.");
            break;
            case 19:
                p.frame.sendMessage(p, "Congratulations, you just advanced a farming level.");
            break;
            case 20:
                p.frame.chatboxInterface(p, 4267);
                p.frame.setText126(p, "Congratulations, you just advanced a runecrafting level!", 4268);
                p.frame.setText126(p, "Your runecrafting level is now " + p.getLevelForXP(skill) + " .", 4269);
                p.frame.sendMessage(p, "Congratulations, you just advanced a runecrafting level.");
            break;
        }
        p.dialogue = 0;
    }
}